﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using BSC;
using System.Reflection;

namespace DALFactory
{
    public sealed class DataAccess
    {
        private static readonly string path = ConfigurationManager.AppSettings["WebDAL"];

        private DataAccess() { }

        public static IEmrService CreateDataAccessLayer()
        {
            string className = path + ".EmrService";
            return (IEmrService)Assembly.Load(path).CreateInstance(className);
        }
    }
}
